import request from '@/utils/request'
/** 分类列表查询 */
export const getCateList = () => request.get('/cate')
export const searchList = (date) => request.post('/cate//search', date)

export const updateCate = (date) => request.put('/cate', date)

// 添加子分类
export const plusCate = (date,pId) => request.post(`/cate/${pId}`, date)

export const insertCate = (date) => request.post('/cate', date)
// 获取分类的子分类
export const getChilderen = (id) => request.get(`/cate/childeren/${id ? id : '-1'}`)